package com.dynamixsoftware.printershare;

import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import com.dynamixsoftware.printershare.data.User;

public class ActivityProfile
  extends ActivityCore
{
  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903069);
    setTitle(2131099676);
    ((Button)findViewById(2131230810)).setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        Intent localIntent = new Intent();
        localIntent.setClass(ActivityProfile.this, ActivityProfileEdit.class);
        ActivityProfile.this.startActivity(localIntent);
      }
    });
    ((Button)findViewById(2131230811)).setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        SharedPreferences.Editor localEditor = ActivityProfile.this.prefs.edit();
        localEditor.putString("token", "");
        localEditor.commit();
        ActivityCore.token = "";
        ActivityCore.user = null;
        ActivityCore.remote_printers = null;
        ActivityProfile.this.finish();
      }
    });
  }
  
  protected void update()
  {
    if (user == null) {
      return;
    }
    ((TextView)findViewById(2131230743)).setText(user.login);
    ((TextView)findViewById(2131230744)).setText(user.name);
    ((TextView)findViewById(2131230745)).setText(user.nick);
    ((TextView)findViewById(2131230746)).setText(user.email);
    ((TextView)findViewById(2131230747)).setText(user.phone);
    ((TextView)findViewById(2131230748)).setText(user.address);
    ((TextView)findViewById(2131230749)).setText(user.city + " " + user.state + " " + user.zip);
    ((TextView)findViewById(2131230750)).setText(user.country);
  }
}


/* Location:           C:\Users\Admin\Desktop\Decompiler\JAD\jd-gui-0.3.6.windows\classes_dex2jar.jar
 * Qualified Name:     com.dynamixsoftware.printershare.ActivityProfile
 * JD-Core Version:    0.7.0.1
 */